﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Cookies aCookies=new Cookies();
        if(aCookies.getCookies("cID")!="0")
        {
           lblIP.Text = Request.UserHostAddress;
           lblAdminName.Text = aCookies.getCookies("cAdminName");
        }
        else
        {
            Response.Redirect("~/Default.aspx");
        }
        
    }
    protected void LBLLOGOUT_Click(object sender, EventArgs e)
    {
        Cookies c = new Cookies();
        c.addCookies("cID", "", -1);
        c.addCookies("cCityID", "", -1);
        c.addCookies("cAdminName", "",-1);
        c.addCookies("cFlag", "", 0);
        c.addCookies("corderFlag", "", -1);
        c.addCookies("cCustomerID", "", -1);
        Response.Redirect("~/Default.aspx");
    }
}
